package com.bflow.api;

import com.bflow.api.bo.BflowDefineProcessDrawBo;
import com.bflow.api.bo.draw.DrawBo;
import com.bflow.commons.exception.BizException;
import com.bflow.commons.po.BasePo;
import com.bflow.commons.service.IBaseService;

import java.io.Serializable;
import java.util.List;

/**
 * @Name BflowDefineProcessDraw 流程定义图画-业务接口
 * @Author haowen
 * @Date 2019-01-10
 */
public interface IBflowDefineProcessDrawService<P extends BasePo, B extends Serializable> extends IBaseService<P, B> {

    /**
     * 增加
     * @param bflowDefineProcessDrawBo
     * @return
     */
    Long save(BflowDefineProcessDrawBo bflowDefineProcessDrawBo) throws BizException;

    /**
     *  获取流程图画
     * @param procId 流程定义ID
     * @param drawKey 图画KEY
     * @return
     * @throws BizException
     */
    BflowDefineProcessDrawBo get(String procId, String drawKey) throws BizException;


    /**
     * 组合流程数据用于流程定义列列表查看
     */
    DrawBo getDraw(String processId) throws BizException;

    /**
     * 组合流程数据用于业务列表查看
     */
    DrawBo getDrawByInstanceId(String instanceId,String userId) throws BizException;

    /**
     * 根据key查询
     * @return
     * @throws BizException
     */
    BflowDefineProcessDrawBo getDrawByKey(String key)throws BizException;
}


